package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysProjectTypeMapper;
import com.ruoyi.system.domain.SysProjectType;
import com.ruoyi.system.service.ISysProjectTypeService;

/**
 * 招标类型Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-08-03
 */
@Service
public class SysProjectTypeServiceImpl implements ISysProjectTypeService 
{
    @Autowired
    private SysProjectTypeMapper sysProjectTypeMapper;

    /**
     * 查询招标类型
     * 
     * @param id 招标类型text
     * @return 招标类型
     */
    @Override
    public SysProjectType selectSysProjectTypeById(Long id)
    {
        return sysProjectTypeMapper.selectSysProjectTypeById(id);
    }

    /**
     * 查询招标类型
     * @param name [text]
     * @return
     */
    @Override
    public SysProjectType selectSysProjectTypeByName(String name)
    {
        return sysProjectTypeMapper.selectSysProjectTypeByName(name);
    }

    /**
     * 查询招标类型列表
     * 
     * @param sysProjectType 招标类型
     * @return 招标类型
     */
    @Override
    public List<SysProjectType> selectSysProjectTypeList(SysProjectType sysProjectType)
    {
        return sysProjectTypeMapper.selectSysProjectTypeList(sysProjectType);
    }

    /**
     * 新增招标类型
     * 
     * @param sysProjectType 招标类型
     * @return 结果
     */
    @Override
    public int insertSysProjectType(SysProjectType sysProjectType)
    {
        sysProjectType.setCreateTime(DateUtils.getNowDate());
        return sysProjectTypeMapper.insertSysProjectType(sysProjectType);
    }

    /**
     * 修改招标类型
     * 
     * @param sysProjectType 招标类型
     * @return 结果
     */
    @Override
    public int updateSysProjectType(SysProjectType sysProjectType)
    {
        sysProjectType.setUpdateTime(DateUtils.getNowDate());
        return sysProjectTypeMapper.updateSysProjectType(sysProjectType);
    }

    /**
     * 批量删除招标类型
     * 
     * @param ids 需要删除的招标类型主键
     * @return 结果
     */
    @Override
    public int deleteSysProjectTypeByIds(Long[] ids)
    {
        return sysProjectTypeMapper.deleteSysProjectTypeByIds(ids);
    }

    /**
     * 删除招标类型信息
     * 
     * @param id 招标类型主键
     * @return 结果
     */
    @Override
    public int deleteSysProjectTypeById(Long id)
    {
        return sysProjectTypeMapper.deleteSysProjectTypeById(id);
    }
}
